﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TonyNet4V1.Structs
{
	/// <summary>
	/// 表结构实体类
	/// </summary>
	public class TableStructure : BaseClass
	{
		private string _strName;
		private string _strType;
		private int _nLength;
		private Boolean _bCheckLength;
		private string _strValue;

		/// <summary>
		/// 表字段名
		/// </summary>
		/// <![CDATA[2014-6-20 15:53:42]]>
		public string strName
		{
			get { return _strName; }
			set { _strName = value.Trim(); }
		}

		/// <summary>
		/// 表字段类型
		/// </summary>
		/// <![CDATA[2014-6-20 15:53:50]]>
		public string strType
		{
			get { return _strType; }
			set { _strType = value.Trim(); }
		}

		/// <summary>
		/// 表字段长度
		/// </summary>
		/// <![CDATA[2014-6-20 15:53:58]]>
		public int nLength
		{
			get { return _nLength; }
			set { _nLength = value; }
		}

		/// <summary>
		/// 表的该字段是否需要检查长度
		/// </summary>
		/// <![CDATA[2014-6-20 15:54:07]]>
		public Boolean bCheckLength
		{
			get { return _bCheckLength; }
			set { _bCheckLength = value; }
		}

		/// <summary>
		/// 表字段值
		/// </summary>
		/// <![CDATA[2014-6-20 15:54:20]]>
		public string strValue
		{
			get { return _strValue; }
			set { _strValue = value.Trim(); }
		}

		//public string Name
		//{
		//        get { return _strName; }
		//        set { _strName = value.Trim(); }
		//}
		//public string Type
		//{
		//        get { return _strType; }
		//        set { _strType = value.Trim(); }
		//}
		//public int Length
		//{
		//        get { return _nLength; }
		//        set { _nLength = value; }
		//}
		//public Boolean IsCheckLength
		//{
		//        get { return _bCheckLength; }
		//        set { _bCheckLength = value; }
		//}
		//public string Value
		//{
		//        get { return _strValue; }
		//        set { _strValue = value.Trim(); }
		//}

		public TableStructure()
			: base()
		{
			_strName = "";
			_strType = "";
			_nLength = 0;
			_bCheckLength = true;
			_strValue = "";
		}
	}
}
